//引入mockjs
import Mock from 'mockjs';
//使用mockjs模拟数据

Mock.mock('/api/data/pieData', 'post', () => {
    return {
        "code": 1,
        "data": {
            "name":['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎'],
            "product":  [
                { value: 335, name: '直接访问' },
                { value: 310, name: '邮件营销' },
                { value: 234, name: '联盟广告' },
                { value: 135, name: '视频广告' },
                { value: 1548, name: '搜索引擎' }
            ]
        },
        "message": null,
        "success": true
    }
});
Mock.mock('/api/data/barData', 'post', () => {
    return {
        "code": 1,
        "data": {
            "product":  [
                ['product', '2225', '2016', '2017'],
                ['Matcha Latte', 43.3, 85.8, 93.7],
                ['Milk Tea', 83.1, 73.4, 55.1],
                ['Cheese Cocoa', 86.4, 65.2, 82.5],
                ['Walnut Brownie', 72.4, 53.9, 39.1]
            ]
        },
        "message": null,
        "success": true
    }
});
